package com.cjst.pojo.enums;

public enum VehicleCustomsStatusEnum implements BaseEnum{
    arrivals(1, "预抵"),
    /*shipment(2, "装船"),*/
    wharf_storage(3, "码头仓储"),
    bonded_declaration(4, "保税仓储"),
    /*prepare_data(5, "准备清关资料"),
    inspection(6, "报检"),*/
    declare_customs(7, "报关中"),
    field_evaluation(8, "现场验估"),
    control_inspection(9, "布控查验"),
    pay_taxes(10, "已缴税"),
    pass(11, "已放行"),
    redress(12, "改装上线"),
    inspection_sheet(13, "商检单OK"),
    close_inspection(14, "关单OK"),
    complete_formalities(15, "手续齐全"),
    end(16, "通关完成");

    private VehicleCustomsStatusEnum(int status, String msg){
        this.status = status;
        this.msg = msg;
    }

    @Override
    public String getEmunByCode(int code) {
        String result = "";
        BaseEnum[] es = getBaseEmuns();
        for (BaseEnum e : es) {
            if (e.getStatus() == code) {
                result = e.getMsg();
                break;
            }
        }
        return result;
    }

    @Override
    public BaseEnum[] getBaseEmuns() {
        return VehicleCustomsStatusEnum.values();
    }

    public static String getMsgByCode(int code) {
        String result = "";
        BaseEnum[] es = VehicleCustomsStatusEnum.values();
        for (BaseEnum e : es) {
            if (e.getStatus() == code) {
                result = e.getMsg();
                break;
            }
        }
        return result;
    }

    private int status;

    private String msg;

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
